package tech.ihai.spring.boot.sample;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import tech.ihai.spring.boot.sample.loader.LoadDemoData;

/**
 * @author Adolphus
 * @description TODO
 * @date 2021/9/14 10:56
 */
@SpringBootApplication
public class DatasourceApplication {

    public static void main(String[] args) throws Exception {
        ApplicationContext applicationContext = SpringApplication.run(DatasourceApplication.class, args);
        LoadDemoData loadDemoData = applicationContext.getBean(LoadDemoData.class);
        try {
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\餐饮单位.xlsx",0);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\建筑工地.xlsx",4);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\培训机构.xlsx",6);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\商业综合体.xlsx",3);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\上网服务场所.xlsx",2);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\学校.xlsx",5);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\药店.xlsx",1);
            loadDemoData.loadData("D:\\柯桥\\大综合执法一体化\\需求\\20220705\\场所\\娱乐场所.xlsx",7);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
